<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <h1> h1 element </h1>
    <a href="">my href</a>
    
    <script src="http://cdn.bootcss.com/jquery/3.1.0/jquery.slim.min.js"></script>
    <script>
$(document).ready(function(){//在DOM解析完成后马上执行
    /*$( window ).load(function() { ... }) 在整个网页加载完后执行 */
    /* 简写:$(function() {...  });*/
    $('h1').remove();	
    console.log('ready to remove <h1>');
    $('a').attr({
	title:'all my href are the same now',
	href: 'http://www.baidu.com'
    });
    /* .attr() as the getter:   $('a').attr('href');return href of the first <a> element*/
});
    </script>
</body>
</html>
